﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using QLKHO.Class;


namespace QLKHO.Forms
{
    public partial class frmReport : Form
    {
        public frmReport()
        {
            InitializeComponent();
        }

        private void frmReport_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'qLKHODataSet.proc_baocaophieunhap' table. You can move, or remove it, as needed.

            // TODO: This line of code loads data into the 'qLKHODataSet.proc_baocaophieunhap' table. You can move, or remove it, as needed.
            
            // TODO: This line of code loads data into the 'qLKHODataSet.proc_baocaophieunhap' table. You can move, or remove it, as needed.
           // this.proc_baocaophieunhapTableAdapter.Fill(this.qLKHODataSet.proc_baocaophieunhap);
            // TODO: This line of code loads data into the 'qLKHODataSet.proc_load_reportChiTietPhieuNhap' table. You can move, or remove it, as needed.
            string strSQL = "ALTER proc [dbo].[proc_baocaophieunhap] as exec proc_load_reportChiTietPhieuNhap " + "'" + clsMain.strMSPhieuNhapKho + "','"+ System.DateTime.Now+"'" ;
            ADODB.Recordset Rs = new ADODB.Recordset();
            Rs.Open(strSQL, clsMain.flexConn.fcConn, ADODB.CursorTypeEnum.adOpenStatic, ADODB.LockTypeEnum.adLockOptimistic, -1);
            this.qLKHODataSet.proc_baocaophieunhap.Clear();
            this.proc_baocaophieunhapTableAdapter.Fill(this.qLKHODataSet.proc_baocaophieunhap);
            this.reportViewer1.RefreshReport();
            
        }
    }
}
